/*******************************************************************************
*
*  (C) COPYRIGHT AUTHORS, 2015 - 2016
*
*  TITLE:       PROPSECURITYCONSTS.H
*
*  VERSION:     1.45
*
*  DATE:        07 Aug 2016
*
*  Consts header file for Security property sheet.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED
* TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
*******************************************************************************/
#pragma once

/********************************************************************************
*
* Access values for supported types
*
*********************************************************************************/

//
//General Access Values
//
#define MAX_KNOWN_GENERAL_ACCESS_VALUE 5
static SI_ACCESS GeneralAccessValues[MAX_KNOWN_GENERAL_ACCESS_VALUE] = {
    { &GUID_NULL, DELETE, L"Delete", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, READ_CONTROL, L"Read Control", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WRITE_DAC, L"Write DAC", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WRITE_OWNER, L"Write Owner", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SYNCHRONIZE, L"Synchronize", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Section Access Values
//
#define MAX_KNOWN_SECTION_ACCESS_VALUE 5
static SI_ACCESS SectionAccessValues[MAX_KNOWN_SECTION_ACCESS_VALUE] = {
    { &GUID_NULL, SECTION_QUERY, L"Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SECTION_MAP_WRITE, L"Map Write", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SECTION_MAP_READ, L"Map Read", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SECTION_MAP_EXECUTE, L"Map Execute", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SECTION_EXTEND_SIZE, L"Extend Size", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Directory Access Values
//
#define MAX_KNOWN_DIRECTORY_ACCESS_VALUE 4
static SI_ACCESS DirectoryAccessValues[MAX_KNOWN_DIRECTORY_ACCESS_VALUE] = {
    { &GUID_NULL, DIRECTORY_QUERY, L"Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DIRECTORY_TRAVERSE, L"Traverse", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DIRECTORY_CREATE_OBJECT, L"Create Object", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DIRECTORY_CREATE_SUBDIRECTORY, L"Create SubDirectory", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//File Access Values
//
#define MAX_KNOWN_FILE_ACCESS_VALUE 14
static SI_ACCESS FileAccessValues[MAX_KNOWN_FILE_ACCESS_VALUE] = {
    { &GUID_NULL, FILE_READ_DATA, L"Read Data", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_LIST_DIRECTORY, L"List Directory", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_WRITE_DATA, L"Write Data", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_ADD_FILE, L"Add File", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_APPEND_DATA, L"Append Data", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_ADD_SUBDIRECTORY, L"Add SubDirectory", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_CREATE_PIPE_INSTANCE, L"Create Pipe Instance", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_READ_EA, L"Read EA", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_WRITE_EA, L"Write EA", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_EXECUTE, L"Execute", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_TRAVERSE, L"Traverse", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_DELETE_CHILD, L"Delete Child", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_READ_ATTRIBUTES, L"Read Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, FILE_WRITE_ATTRIBUTES, L"Write Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Event Access Values
//
#define MAX_KNOWN_EVENT_ACCESS_VALUE 2
static SI_ACCESS EventAccessValues[MAX_KNOWN_EVENT_ACCESS_VALUE] = {
    { &GUID_NULL, EVENT_QUERY_STATE, L"Query State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, EVENT_MODIFY_STATE, L"Modify State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};


//
//Mutant Access Values
//
#define MAX_KNOWN_MUTANT_ACCESS_VALUE 1
static SI_ACCESS MutantAccessValues[MAX_KNOWN_MUTANT_ACCESS_VALUE] = {
    { &GUID_NULL, MUTANT_QUERY_STATE, L"Query State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Desktop Access Values
//
#define MAX_KNOWN_DESKTOP_ACCESS_VALUE 9
static SI_ACCESS DesktopAccessValues[MAX_KNOWN_DESKTOP_ACCESS_VALUE] = {
    { &GUID_NULL, DESKTOP_READOBJECTS, L"Read Objects", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_CREATEWINDOW, L"Create Window", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_CREATEMENU, L"Create Menu", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_HOOKCONTROL, L"Hook Control", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_JOURNALRECORD, L"Journal Record", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_JOURNALPLAYBACK, L"Journal Playback", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_ENUMERATE, L"Enumerate", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_WRITEOBJECTS, L"WriteObjects", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, DESKTOP_SWITCHDESKTOP, L"Switch Desktop", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//WinStation Access Values
//
#define MAX_KNOWN_WINSTATION_ACCESS_VALUE 9
static SI_ACCESS WinStationAccessValues[MAX_KNOWN_WINSTATION_ACCESS_VALUE] = {
    { &GUID_NULL, WINSTA_ENUMDESKTOPS, L"Enumerate Desktops", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_READATTRIBUTES, L"Read Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_ACCESSCLIPBOARD, L"Access Clipboard", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_CREATEDESKTOP, L"Create Desktop", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_WRITEATTRIBUTES, L"Write Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_ACCESSGLOBALATOMS, L"Access Global Atoms", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_EXITWINDOWS, L"Exit Windows", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_ENUMERATE, L"Enumerate", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, WINSTA_READSCREEN, L"Read Screen", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Key Access Values
//
#define MAX_KNOWN_KEY_ACCESS_VALUE 8
static SI_ACCESS KeyAccessValues[MAX_KNOWN_KEY_ACCESS_VALUE] = {
    { &GUID_NULL, KEY_QUERY_VALUE, L"Query Value", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_SET_VALUE, L"Set Value", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_CREATE_SUB_KEY, L"Create Subkey", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_ENUMERATE_SUB_KEYS, L"Enumerate Subkeys", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_NOTIFY, L"Notify", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_CREATE_LINK, L"Create Link", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_WOW64_64KEY, L"Access 64 bit key", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, KEY_WOW64_32KEY, L"Access 32 bit key", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Semaphore Access Values
//
#define MAX_KNOWN_SEMAPHORE_ACCESS_VALUE 2
static SI_ACCESS SemaphoreAccessValues[MAX_KNOWN_SEMAPHORE_ACCESS_VALUE] = {
    { &GUID_NULL, SEMAPHORE_QUERY_STATE, L"Query State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, SEMAPHORE_MODIFY_STATE, L"Modify State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Symlink Access Values
//
#define MAX_KNOWN_SYMLINK_ACCESS_VALUE 1
static SI_ACCESS SymlinkAccessValues[MAX_KNOWN_SYMLINK_ACCESS_VALUE] = {
    { &GUID_NULL, SYMBOLIC_LINK_QUERY, L"Link Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Timer Access Values
//
#define MAX_KNOWN_TIMER_ACCESS_VALUE 2
static SI_ACCESS TimerAccessValues[MAX_KNOWN_TIMER_ACCESS_VALUE] = {
    { &GUID_NULL, TIMER_QUERY_STATE, L"Query State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, TIMER_MODIFY_STATE, L"Modify State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Job Access Values
//
#define MAX_KNOWN_JOB_ACCESS_VALUE 5
static SI_ACCESS JobAccessValues[MAX_KNOWN_JOB_ACCESS_VALUE] = {
    { &GUID_NULL, JOB_OBJECT_ASSIGN_PROCESS, L"Assign Process", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, JOB_OBJECT_SET_ATTRIBUTES, L"Set Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, JOB_OBJECT_QUERY, L"Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, JOB_OBJECT_TERMINATE, L"Terminate", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, JOB_OBJECT_SET_SECURITY_ATTRIBUTES, L"Set Security Attributes", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//Port Access Values
//
#define MAX_KNOWN_PORT_ACCESS_VALUE 1
static SI_ACCESS PortAccessValues[MAX_KNOWN_PORT_ACCESS_VALUE] = {
    { &GUID_NULL, PORT_CONNECT, L"Connect", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//IoCompletion Access Values
//
#define MAX_KNOWN_IOCOMPLETION_ACCESS_VALUE 2
static SI_ACCESS IoCompletionAccessValues[MAX_KNOWN_IOCOMPLETION_ACCESS_VALUE] = {
    { &GUID_NULL, IO_COMPLETION_QUERY_STATE, L"Query State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, IO_COMPLETION_MODIFY_STATE, L"Modify State", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};

//
//MemoryPartition Access Values
//
#define MAX_KNOWN_MEMORYPARTITION_ACCESS_VALUE 3
static SI_ACCESS MemoryPartitionAccessValues[MAX_KNOWN_MEMORYPARTITION_ACCESS_VALUE] = {
    { &GUID_NULL, MEMORY_PARTITION_ALL_ACCESS, L"Full Control", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC},
    { &GUID_NULL, MEMORY_PARTITION_QUERY_ACCESS, L"Query", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC },
    { &GUID_NULL, MEMORY_PARTITION_MODIFY_ACCESS, L"Modify", SI_ACCESS_GENERAL | SI_ACCESS_SPECIFIC }
};
